package com.arpa.wms.domain.entity;

import com.arpa.wms.domain.enums.BillingUnitEnum;
import com.arpa.wms.domain.enums.ExpenseDetailStatusEnum;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * <p>
 * 仓库费用明细
 * </p>
 *
 * @author LEO
 * @since 2020-11-17
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("wms_expense_detail")
@ApiModel(value="ExpenseDetail对象", description="仓库费用明细")
public class ExpenseDetail extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "记录标识")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "所属机构",hidden = true)
    @TableField("group_code")
    private String groupCode;

    @ApiModelProperty(value = "合同标识")
    @TableField("contract_code")
    private String contractCode;

    @ApiModelProperty(value = "仓库标识")
    @TableField("warehouse_code")
    private String warehouseCode;

    @ApiModelProperty(value = "仓库名称")
    @TableField("warehouse_name")
    private String warehouseName;

    @ApiModelProperty(value = "入驻商")
    @TableField("shipment_code")
    private String shipmentCode;

    @ApiModelProperty(value = "货主名称")
    @TableField("shipment_name")
    private String shipmentName;

    @ApiModelProperty(value = "来源单号")
    @TableField("source_code")
    private String sourceCode;

    @ApiModelProperty(value = "订单日期")
    @TableField("gmt_order")
    private LocalDate gmtOrder;

    @ApiModelProperty(value = "商品标识")
    @TableField("goods_code")
    private String goodsCode;

    @ApiModelProperty(value = "商品编码")
    @TableField("good_code")
    private String goodCode;

    @ApiModelProperty(value = "商品名称")
    @TableField("goods_name")
    private String goodsName;

    @ApiModelProperty(value = "数量")
    @TableField("quantity")
    private BigDecimal quantity;

    @ApiModelProperty(value = "重量")
    @TableField("weight")
    private BigDecimal weight;

    @ApiModelProperty(value = "收货批次")
    @TableField("receive_lot")
    private String receiveLot;

    @ApiModelProperty(value = "费用类型")
    @TableField("fee_type")
    private String feeType;

    @ApiModelProperty(value = "计费单位：PIECE（件），TON（吨），LOCATION（库位）")
    @TableField("billing_unit")
    private BillingUnitEnum billingUnit;

    @ApiModelProperty(value = "单价")
    @TableField("unit_price")
    private BigDecimal unitPrice;

    @ApiModelProperty(value = "金额")
    @TableField("amount_money")
    private BigDecimal amountMoney;

    @ApiModelProperty(value = "已结算金额")
    @TableField("settled_money")
    private BigDecimal settledMoney;

    @ApiModelProperty(value = "未结算金额")
    @TableField("unsettled_money")
    private BigDecimal unsettledMoney;

    @ApiModelProperty(value = "待结算金额")
    @TableField("waiting_settled_money")
    private BigDecimal waitingSettledMoney;

    @ApiModelProperty(value = "开始时间")
    @TableField("gmt_settled_begin")
    private LocalDate gmtSettledBegin;

    @ApiModelProperty(value = "结束时间")
    @TableField("gmt_settled_end")
    private LocalDate gmtSettledEnd;

    @ApiModelProperty(value = "状态:UNSETTLED(未结算)，SETTLED(已结算)，PARTIALLY_SETTLED(部分结算)")
    @TableField("status")
    private ExpenseDetailStatusEnum status;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;


}
